package com.talos.ums.controller.admin.userloginhis.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 用户登录历史记录表新增/修改 Request VO")
@Data
public class UmsUserLoginHisSaveReqVO {

    @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "19538")
    private Long id;

    @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "28230")
    @NotNull(message = "不能为空")
    private Long userId;

    @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "不能为空")
    private String userCode;

    @Schema(description = "登录IP地址")
    private String ipAddress;

    @Schema(description = "登录时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "登录时间不能为空")
    private LocalDateTime time;

    @Schema(description = "登录终端:APP,PC")
    private String terminal;

    @Schema(description = "是否登录成功: 0-失败,1-成功", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否登录成功: 0-失败,1-成功不能为空")
    private Integer success;

    @Schema(description = "登录失败编码")
    private String errorCode;

    @Schema(description = "登录失败原因")
    private String errorMsg;

    @Schema(description = "登录姓名", example = "张三")
    private String userName;

}
